<div id="content-container" class="container" style="margin-top: 50px;">
    <div class="row">
        <div class="col-md-3">
            {include file="common/sidenav" /}
        </div>
        <div class="col-md-9">
            <div class="panel panel-default">
                <div class="panel-body">
                    <h2 class="page-header">{:__('Language')}</h2>
                    <form id="changepwd-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
                        {:token()}
                        <div class="form-group">
                            <label for="oldpassword" class="control-label col-xs-12 col-sm-2">{:__('Set Language')}:</label>
                            <div class="col-xs-12 col-sm-4">
                                <select name="" id="choose_lang" class="form-control" >
                                    <option value="en" {$config['language']=='en'?'selected':''}>English</option>
                                    <option value="zh-cn" {$config['language']=='zh-cn'?'selected':''}>简体</option>
                                    <option value="zh-hk" {$config['language']=='zh-hk'?'selected':''}>繁體</option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group normal-footer">
                            <label class="control-label col-xs-12 col-sm-2"></label>
                            <div class="col-xs-12 col-sm-8">
                                <button type="button" class="btn btn-primary btn-embossed" onclick="changeLanguage(this)">{:__('Submit')}</button>
                                <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                            </div>
                        </div>
                        <script>
                            function changeLanguage(){
                                var lang = $("#choose_lang").val();
                                var url ="{:url('language')}?lang="+lang;
                                window.location.href = url;
                            }
                        </script>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
